<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>输入一个字符串过滤到所有非数字</title>
	</head>
	<body>
		<script type="text/javascript">
			function t(s) {
				return s.replace(/[^0-9]/ig,"");
			}
			let str = prompt();
			console.log(t(str));
			
		</script>
	</body>
</html>
